﻿using System;
using System.Data;
using System.Configuration;
using System.Linq;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.HtmlControls;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Xml.Linq;

/// <summary>
/// Summary description for Global
/// </summary>
public class Global
{
    public static string CONNECTION_STRING = ConfigurationManager.ConnectionStrings["ConStr"].ToString();
    public const string SESSION_ERROR = "error";
    public const string ERROR_PAGE = "~/Wedding/Error.aspx";
    public const string SESSION_CART = "UserCart";
    public const string SESSION_TOTAL = "0.0";
    public const string SESSION_LOGGED_USER = "User";
    public const string SESSION_BOOK = "BOOK";

    public Global()
    {
        //
        // TODO: Add constructor logic here
        //
    }
    public static int ConvertToInt(string interger)
    {
        int i = 0;
        Int32.TryParse(interger, out i);

        return i;
    }
    public static string ConvertToDate(string strDate)
    {
        if (strDate != "")
            return strDate.Substring(6, 4) + strDate.Substring(3, 2) + strDate.Substring(0, 2);
        else
            return "";
    }

}
